package spoon.dao;

import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import spoon.core.domain.Game;

@Repository
public class Bet365DaoImpl extends SqlSessionDaoSupport implements Bet365Dao {

	@Autowired
	protected void init(SqlSessionFactory sqlSessionFactory) {
		this.setSqlSessionFactory(sqlSessionFactory);
	}
	
	@Override
	public void delete(Game game) {
		getSqlSession().delete("bet365.delete", game);
	}

	@Override
	public Integer addBetting(Game game) {
		return getSqlSession().insert("bet365.add", game);
	}
	
}
